{tpl head}
<script src="{$skin}style/time/mobiscroll_002.js" type="text/javascript"></script>
<script src="{$skin}style/time/mobiscroll_004.js" type="text/javascript"></script>
<link href="{$skin}style/time/mobiscroll_002.css" rel="stylesheet" type="text/css">
<link href="{$skin}style/time/mobiscroll.css" rel="stylesheet" type="text/css">
<script src="{$skin}style/time/mobiscroll.js" type="text/javascript"></script>
<script src="{$skin}style/time/mobiscroll_003.js" type="text/javascript"></script>
<script src="{$skin}style/time/mobiscroll_005.js" type="text/javascript"></script>
<link href="{$skin}style/time/mobiscroll_003.css" rel="stylesheet" type="text/css">
<style>
.list-group-item {
	overflow:hidden
}
select{border:0;border:none;appearance:none;
-moz-appearance:none; /* Firefox */
-webkit-appearance:none; /* Safari 和 Chrome */}
</style>

<header class="header-fix main-nav bg-black header header-lg navbar navbar-fixed-top-xs box-shadow">
  <div class="container">
    <div class="navbar-header aside-sm"> <a class="btn btn-link visible-xs" href="javascript:history.back()"> <i class="icon iconfont">&#xf007a;</i> </a>
      <div class="navbar-brand">日常工作 </div>
      <a class="rbtn radius btn-warning" href="{$back}"> 返回 </a> </div>
  </div>
  </div>
</header>
<form action="" method="post" id="myform" onsubmit="return send();">
<div class="middle-box container loginscreen  animated fadeInDown mt60">
  <div class="m-t">
    <div class="list-group">
      <div class="list-group-item regitem">
        <label class="col-xs-4 lh56">日期：</label>
        <div class="iptbg col-xs-8">
          <input type="text" class="form-control no-border" placeholder="日期" readonly="readonly" name="a[startdate]" id="appDate" value="{if $obj.id}{function=date('Y-m-d',$obj.startdate)}{/if}">
        </div>
      </div>
      <!--<div class="list-group-item regitem">
        <label class="col-xs-4 lh56">责任人：</label>
        <div class="iptbg col-xs-8">
          <input name="{$uid}" type="text" class="form-control no-border" value="Duan'shengyao">
        </div>
      </div>-->
      <div class="list-group-item regitem">
        <label class="col-xs-4 lh56">工作内容：</label>
        <div class="iptbg col-xs-8">
          <input type="text" name="a[title]" class="form-control no-border" value="{if $obj.id}{$obj.title}{/if}" placeholder="工作内容">
        </div>
      </div>
     <div class="list-group-item regitem">
        <label class="col-xs-4 lh56">工作状态：</label>
        <div class="iptbg col-xs-8">
            <input type="text" name="a[shorttitle]" class="form-control no-border" value="{if $obj.id}{$obj.shorttitle}{/if}" placeholder="完成情况">
        </div>
      </div>
 <div class="list" id="x1" style="display:none">
 	</div>
    <div class="list-group-item regitem" id="x2">
      <label class="col-xs-4 lh56">补贴等级：</label>
        <div class="iptbg col-xs-8">  
 	<select size="1" name="a[click]" class="form-control no-border">
			<option value="0" {if !$obj.click}selected{/if}>无</option>
			<option value="1" {if $obj.click==1}selected{/if}>等级一</option>
			<option value="2" {if $obj.click==2}selected{/if}>等级二</option>
			<option value="3" {if $obj.click==3}selected{/if}>等级三</option>
			<option value="4" {if $obj.click==4}selected{/if}>等级四</option>
 		</select>
        </div>
      </div>

    <div class="list-group-item regitem" id="x2">
      <label class="col-xs-4 lh56">责任人：</label>
      <div class="iptbg col-xs-8">
        <ul>
            {loop $user_list $v}
            {if $v.masterid!=$uid}
          <li><input  {if !$id}type="checkbox"{else}type="hidden"{/if} name="user[]" value="{$v.masterid}"> {$v.nick}</li>
            {/if}
            {/loop}
        </ul>
      </div>
      </div>
        <input type="hidden" name="id" value="{$id}">
    </div>
  </div>
</div>
<button type="submit" id="sub" class="foot_btn regsubmit btn btn-lg btn-primary btn-block submit">保存修改</button>
  </form>
<script type="text/javascript">
  function send(){
    $.ajax({
      cache: false,
      type: "POST",
      dataType:'json',
      url:'',
      data:$('#myform').serialize(),// 你的formid
      async: false,
      error: function(request) {
        alert("未连接到服务器,提交失败!");
      },
      success: function(data) {
        if(data.status=='err'){
          alert(data.msg);
        }else if(data.status=='ok'){
          alert(data.msg);
            window.location="?c=work"
          //$("#sub").attr("disabled","disabled");
        }
      }
    });
    return false;
  }
        $(function () {
			var currYear = (new Date()).getFullYear();	
			var opt={};
			opt.date = {preset : 'date'};
			opt.datetime = {preset : 'datetime'};
			opt.time = {preset : 'time'};
			opt.default = {
				theme: 'android-ics light', //皮肤样式
		        display: 'modal', //显示方式 
		        mode: 'scroller', //日期选择模式
				dateFormat: 'yyyy-mm-dd',
				lang: 'zh',
				showNow: true,
				nowText: "今天",
		        startYear: currYear - 10, //开始年份
		        endYear: currYear + 10 //结束年份
			};

		  	$("#appDate").mobiscroll($.extend(opt['date'], opt['default']));
		  	var optDateTime = $.extend(opt['datetime'], opt['default']);
		  	var optTime = $.extend(opt['time'], opt['default']);
         });
		 
 

     </script>
</body>
</html>
